using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Content;
using System.Net.Sockets;
using System.IO;
using System.Net;

namespace Xfinity.Loaders
{
    /// <summary>
    /// Provides a content manager that can load files from an arbitrary location on the internet.
    /// </summary>
    public class NetworkContentManager:ContentManager
    {
        public NetworkContentManager(IServiceProvider serviceProvider)
            : base(serviceProvider)
        {
            
        }
        
        protected override System.IO.Stream OpenStream(string assetName)
        {
            WebRequest request = WebRequest.Create(assetName);
            return request.GetRequestStream();            
        }
    }
}
